<p>
    {if $listPages}{$listPages}{else}???listPages???{/if}
    {displaytemplate module="AdvModule" template="pages" param=$paging}
</p>

{$form}
<input type="hidden" name="_tableName" value="{$tableName}" />

<table>
    <tr>
        <td>
            <input type="hidden" name="_link" value="{$paging.linkPreffix}" />
        </td>
        {foreach from=$table item=type key=property}
        <td><input type="{$type}" name="{$property}"{if $type == 'checkbox'} value="1"{if $filter[$property]} checked=""{/if}{else} value="{$filter[$property]}"{/if} /></td>
        {/foreach}
        <td>
            <input type="submit" value="{if $filterButton}{$filterButton|escape:html}{else}???filterButton???{/if}" id="filterButton" />
        </td>
    </tr>
    {section name=rows loop=$head}
    <tr>
        <th>
            <input type="checkbox" id="select-all" />
        </th>
        {section name=cols loop=$head[rows]}
        <th>{$head[rows][cols]}</th>
        {/section}
        <th>&nbsp;</th>
    </tr>
    {/section}
    {section name=rows loop=$items}
    <tr>
        <td>
            <input type="checkbox" name="id[]" value="{$items[rows].id}" />
        </td>
        {foreach from=$items[rows] item=item key=key}
        {if is_numeric($key)}
        <td>{$item}</td>
        {/if}
        {/foreach}
        <td>
            <a href="{$items[rows].edit}">{if $edit}{$edit}{else}???edit{/if}</a>
            <a href="{$items[rows].delete}" onclick="return confirm('{if $reallyDelete}{$reallyDelete|escape:javascript}{else}???reallyDelete???{/if}')">{if $delete}{$delete}{else}???delete???{/if}</a>
        </td>
    </tr>
    {/section}
</table>

<input type="submit"
       onclick="return confirm('{if $reallyDelete}{$reallyDelete|escape:'javascript'}{else}???reallyDelete???{/if}')"
       value="{if $deleteAll}{$deleteAll|escape:'html'}{else}???deleteAll???{/if}" />

</form>

<p>
    {if $listPages}{$listPages}{else}???listPages???{/if}
    {displaytemplate module="AdvModule" template="pages" param=$paging}
</p>